package org.example.Day6.MAP;

import java.util.HashMap;
import java.util.Map;
import java.util.Set;

public class MapTest2 {
    public static void main(String[] args){
        Map<String,Double> map = new HashMap<>();
        map.put("蜘蛛精", 162.5);
        map.put("蜘蛛精", 169.8);
        map.put("紫霞", 165.8);
        map.put("⾄尊宝", 169.5);
        map.put("⽜魔王", 183.6);
        System.out.println(map);

        //绑定entry 键值对
        Set<Map.Entry<String,Double>> entries = map.entrySet();
        for(Map.Entry<String,Double> entry:entries){
            String key = entry.getKey();
            Double value = entry.getValue();
            System.out.println(key+"===>"+value);
        }
    }
}
